package com.fhz.shop.ui.home;

import androidx.lifecycle.LiveData;

import com.fhz.shop.callback.ApiResponse;
import com.fhz.shop.entity.GoodsInfoLocal;
import com.fhz.shop.entity.PageHelper;
import com.fhz.shop.ui.home.datasource.HomeLocalDataSource;
import com.fhz.shop.ui.home.datasource.HomeRemoteDataSource;

import java.util.List;

import javax.inject.Inject;

import retrofit2.http.Path;

/**
 * 时间:2023/8/22
 *
 * @author Mr.Feng
 * 简述: TODO
 */
public class HomeRepository {
    @Inject
    HomeLocalDataSource mHomeLocalDataSource;
    @Inject
    HomeRemoteDataSource mHomeRemoteDataSource;

    @Inject
    public HomeRepository(HomeLocalDataSource homeLocalDataSource, HomeRemoteDataSource homeRemoteDataSource) {
        mHomeLocalDataSource = homeLocalDataSource;
        mHomeRemoteDataSource = homeRemoteDataSource;
    }

    public  LiveData<ApiResponse<PageHelper<GoodsInfoLocal>>> getGoodsInfo(int page, int pageSize){
        return mHomeRemoteDataSource.getGoodsInfo(page, pageSize);
    }

}
